package com.rich.dmr.widget;

import android.os.Parcel;
import android.os.Parcelable;

public class DmrContact implements Parcelable {
    private int id;
    private String name;
    private int phone;
    private int callType;
    private int color;

    public DmrContact(int id, String name, int phone, int callType, int color) {
        this.id = id;
        this.name = name;
        this.phone = phone;
        this.callType = callType;
        this.color = color;
    }

    public DmrContact() {
    }


    protected DmrContact(Parcel in) {
        id = in.readInt();
        name = in.readString();
        phone = in.readInt();
        callType = in.readInt();
        color = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(name);
        dest.writeInt(phone);
        dest.writeInt(callType);
        dest.writeInt(color);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<DmrContact> CREATOR = new Creator<DmrContact>() {
        @Override
        public DmrContact createFromParcel(Parcel in) {
            return new DmrContact(in);
        }

        @Override
        public DmrContact[] newArray(int size) {
            return new DmrContact[size];
        }
    };

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getPhone() {
        return phone;
    }

    public void setPhone(int phone) {
        this.phone = phone;
    }

    public int getCallType() {
        return callType;
    }

    public void setCallType(int callType) {
        this.callType = callType;
    }

    public int getColor() {
        return color;
    }

    public void setColor(int color) {
        this.color = color;
    }
}
